package initialize

import (
	"context"

	model "server/model/system"
	"server/plugin/plugin-tool/utils"
)

func Api(ctx context.Context) {
	entities := []model.SysApi{
		{ApiGroup: "轮播图", Method: "POST", Path: "/banner/createBanner", Description: "新增轮播图"},
		{ApiGroup: "轮播图", Method: "DELETE", Path: "/banner/deleteBanner", Description: "删除轮播图"},
		{ApiGroup: "轮播图", Method: "DELETE", Path: "/banner/deleteBannerByIds", Description: "批量删除轮播图"},
		{ApiGroup: "轮播图", Method: "PUT", Path: "/banner/updateBanner", Description: "更新轮播图"},
		{ApiGroup: "轮播图", Method: "GET", Path: "/banner/findBanner", Description: "根据ID获取轮播图"},
		{ApiGroup: "轮播图", Method: "GET", Path: "/banner/getBannerList", Description: "获取轮播图列表"},

		{ApiGroup: "商品分类", Method: "POST", Path: "/category/createCategory", Description: "新增商品分类"},
		{ApiGroup: "商品分类", Method: "DELETE", Path: "/category/deleteCategory", Description: "删除商品分类"},
		{ApiGroup: "商品分类", Method: "DELETE", Path: "/category/deleteCategoryByIds", Description: "批量删除商品分类"},
		{ApiGroup: "商品分类", Method: "PUT", Path: "/category/updateCategory", Description: "更新商品分类"},
		{ApiGroup: "商品分类", Method: "GET", Path: "/category/findCategory", Description: "根据ID获取商品分类"},
		{ApiGroup: "商品分类", Method: "GET", Path: "/category/getCategoryList", Description: "获取商品分类列表"},

		{ApiGroup: "商品", Method: "POST", Path: "/good/createGood", Description: "新增商品"},
		{ApiGroup: "商品", Method: "DELETE", Path: "/good/deleteGood", Description: "删除商品"},
		{ApiGroup: "商品", Method: "DELETE", Path: "/good/deleteGoodByIds", Description: "批量删除商品"},
		{ApiGroup: "商品", Method: "PUT", Path: "/good/updateGood", Description: "更新商品"},
		{ApiGroup: "商品", Method: "GET", Path: "/good/findGood", Description: "根据ID获取商品"},
		{ApiGroup: "商品", Method: "GET", Path: "/good/getGoodList", Description: "获取商品列表"},

		{ApiGroup: "sku", Method: "POST", Path: "/sku/createSku", Description: "新增sku"},
		{ApiGroup: "sku", Method: "DELETE", Path: "/sku/deleteSku", Description: "删除sku"},
		{ApiGroup: "sku", Method: "DELETE", Path: "/sku/deleteSkuByIds", Description: "批量删除sku"},
		{ApiGroup: "sku", Method: "PUT", Path: "/sku/updateSku", Description: "更新sku"},
		{ApiGroup: "sku", Method: "GET", Path: "/sku/findSku", Description: "根据ID获取sku"},
		{ApiGroup: "sku", Method: "GET", Path: "/sku/getSkuList", Description: "获取sku列表"},

		{ApiGroup: "购物车", Method: "POST", Path: "/cart/createCart", Description: "新增购物车"},
		{ApiGroup: "购物车", Method: "DELETE", Path: "/cart/deleteCart", Description: "删除购物车"},
		{ApiGroup: "购物车", Method: "DELETE", Path: "/cart/deleteCartByIds", Description: "批量删除购物车"},
		{ApiGroup: "购物车", Method: "PUT", Path: "/cart/updateCart", Description: "更新购物车"},
		{ApiGroup: "购物车", Method: "GET", Path: "/cart/findCart", Description: "根据ID获取购物车"},
		{ApiGroup: "购物车", Method: "GET", Path: "/cart/getCartList", Description: "获取购物车列表"},
		{ApiGroup: "购物车", Method: "POST", Path: "/cart/cutCart", Description: "删除购物车"},
		{ApiGroup: "购物车", Method: "POST", Path: "/cart/addCart", Description: "添加购物车"},
		{ApiGroup: "购物车", Method: "GET", Path: "/cart/getSelfCart", Description: "获取自身购物车"},
		{ApiGroup: "购物车", Method: "GET", Path: "/cart/clearCart", Description: "全部删除购物车"},

		{ApiGroup: "订单", Method: "POST", Path: "/order/createOrder", Description: "新增订单"},
		{ApiGroup: "订单", Method: "DELETE", Path: "/order/deleteOrder", Description: "删除订单"},
		{ApiGroup: "订单", Method: "DELETE", Path: "/order/deleteOrderByIds", Description: "批量删除订单"},
		{ApiGroup: "订单", Method: "PUT", Path: "/order/updateOrder", Description: "更新订单"},
		{ApiGroup: "订单", Method: "GET", Path: "/order/findOrder", Description: "根据ID获取订单"},
		{ApiGroup: "订单", Method: "GET", Path: "/order/getOrderList", Description: "获取订单列表"},
		{ApiGroup: "订单", Method: "POST", Path: "/order/placeOrder", Description: "直接下单"},
		{ApiGroup: "订单", Method: "POST", Path: "/order/placeOrderByCart", Description: "购物车下单"},
		{ApiGroup: "订单", Method: "GET", Path: "/order/selfOrderList", Description: "我的订单列表"},
		{ApiGroup: "订单", Method: "GET", Path: "/order/selfOrder", Description: "我的订单详情"},
		{ApiGroup: "订单", Method: "POST", Path: "/order/updateOrderStatus", Description: "变更订单状态"},
		{ApiGroup: "订单", Method: "GET", Path: "/order/selfOrderComment", Description: "获取单商品评价"},
		{ApiGroup: "订单", Method: "GET", Path: "/order/checkRouters", Description: "获取快递路径"},
		{ApiGroup: "订单", Method: "POST", Path: "/order/updateOrder", Description: "更新订单"},

		{ApiGroup: "用户地址", Method: "POST", Path: "/address/createAddress", Description: "新增用户地址"},
		{ApiGroup: "用户地址", Method: "DELETE", Path: "/address/deleteAddress", Description: "删除用户地址"},
		{ApiGroup: "用户地址", Method: "DELETE", Path: "/address/deleteAddressByIds", Description: "批量删除用户地址"},
		{ApiGroup: "用户地址", Method: "PUT", Path: "/address/updateAddress", Description: "更新用户地址"},
		{ApiGroup: "用户地址", Method: "GET", Path: "/address/findAddress", Description: "根据ID获取用户地址"},
		{ApiGroup: "用户地址", Method: "GET", Path: "/address/getAddressList", Description: "获取用户地址列表"},
		{ApiGroup: "用户地址", Method: "GET", Path: "/address/getDefaultAddress", Description: "获取默认用户地址"},

		{ApiGroup: "收藏", Method: "POST", Path: "/collect/createCollect", Description: "新增收藏"},
		{ApiGroup: "收藏", Method: "DELETE", Path: "/collect/deleteCollect", Description: "删除收藏"},
		{ApiGroup: "收藏", Method: "DELETE", Path: "/collect/deleteCollectByIds", Description: "批量删除收藏"},
		{ApiGroup: "收藏", Method: "PUT", Path: "/collect/updateCollect", Description: "更新收藏"},
		{ApiGroup: "收藏", Method: "GET", Path: "/collect/findCollect", Description: "根据ID获取收藏"},
		{ApiGroup: "收藏", Method: "GET", Path: "/collect/getCollectList", Description: "获取收藏列表"},
		{ApiGroup: "用户评论", Method: "POST", Path: "/comment/createComment", Description: "新增用户评论"},
		{ApiGroup: "用户评论", Method: "DELETE", Path: "/comment/deleteComment", Description: "删除用户评论"},
		{ApiGroup: "用户评论", Method: "DELETE", Path: "/comment/deleteCommentByIds", Description: "批量删除用户评论"},
		{ApiGroup: "用户评论", Method: "PUT", Path: "/comment/updateComment", Description: "更新用户评论"},
		{ApiGroup: "用户评论", Method: "GET", Path: "/comment/findComment", Description: "根据ID获取用户评论"},
		{ApiGroup: "用户评论", Method: "GET", Path: "/comment/getComment", Description: "后台获取用户评论"},
		{ApiGroup: "用户评论", Method: "GET", Path: "/comment/getCommentList", Description: "获取用户评论列表"},
	}
	utils.RegisterApis(entities...)
}
